import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    redirect: '/home',
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: 'home',
        component: () => import('@/views/Home')
      },
      {
        path: 'broker',
        component: () => import('@/views/Broker')
      },
      {
        path: 'classify',
        component: () => import('@/views/Classify')
      },
      {
        path: 'about',
        component: () => import('@/views/About')
      },
      {
        path: 'EstateList/:id',
        component: () => import('@/views/Classify/components/EstateList')
      },
      {
        path: 'detail/:id',
        component: () => import('@/views/detail/index')
      },
      {
        path: 'propertyList/:id',
        component: () => import('@/views/Broker/components/propertyList')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
